gtkwindow: Do not leak GtkPointerFocus
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 19 Jul 2017 16:12:53 +0000 (18:12 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 19 Jul 2017 16:16:18 +0000 (18:16 +0200)
gtk_window_add_pointer_focus() increments the refcount, which means
the caller should be dropping its own.

gtk/gtkwindow.c

index 8e711004bbc7c5ea4285affce7e5a61ab13514c0..d680906e49b326ed2690cbd3ee60afca89640ef4 100644 (file)
@@ -11375,6 +11375,7 @@ gtk_window_update_pointer_focus (GtkWindow        *window,
     {
       focus = gtk_pointer_focus_new (window, target, device, sequence, x, y);
       gtk_window_add_pointer_focus (window, focus);
+      gtk_pointer_focus_unref (focus);
     }
 }